package com.yc.cloud.admin.dto.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.util.List;

@Data
@ApiModel(description = "报警信息上传请求DTO")
public class AlarmRecordUploadReqDTO {

    @ApiModelProperty(value = "图片base64数据", required = true)
    @NotBlank(message = "图片数据不能为空")
    private String imageBase64;

    @ApiModelProperty(value = "报警类型", required = true)
    @NotNull(message = "报警类型不能为空")
    private Integer alarmType;

    @ApiModelProperty(value = "报警设备序列号", required = true)
    @NotNull(message = "报警设备序列号不能为空")
    private String deviceSn;

    @ApiModelProperty(value = "摄像头ID（可选，如果不传则自动查询设备绑定的摄像头）")
    private Long cameraId;

    // @ApiModelProperty(value = "模型版本ID", required = true)
    // @NotNull(message = "模型版本ID不能为空")
    // private String modelVersionId;

    // @ApiModelProperty(value = "报警位置")
    // private String location;

    // @ApiModelProperty(value = "报警描述")
    // private String description;

    @ApiModelProperty(value = "目标检测位置信息列表")
    private List<DetectionPositionDTO> detectionPositions;

    @Data
    @ApiModel(description = "目标检测位置信息")
    public static class DetectionPositionDTO {
        @ApiModelProperty(value = "目标类型")
        private String targetType;

        @ApiModelProperty(value = "置信度")
        private Float confidence;

        @ApiModelProperty(value = "左上角x坐标")
        private Integer x;

        @ApiModelProperty(value = "左上角y坐标")
        private Integer y;

        @ApiModelProperty(value = "宽度")
        private Integer width;

        @ApiModelProperty(value = "高度")
        private Integer height;
    }
} 